package com.yuantu.judiciary.model.vo;

import com.yuantu.judiciary.model.dto.EntBasicDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;

/**
 * 企业基本信息
 *
 * @author syw
 * @since 2023-07-18
 **/
@Data
@ApiModel("企业基本信息")
@Builder
public class EntBasicVO {
    @ApiModelProperty("许可经营项目") private String abuitem;
    @ApiModelProperty("组织机构代码") private String orgcodes;
    @ApiModelProperty("注册号") private String regno;
    @ApiModelProperty("统一信用代码") private String creditcode;
    @ApiModelProperty("经营期限至") private String opto;
    @ApiModelProperty("经营期限自") private String opfrom;
    @ApiModelProperty("企业名称") private String entname;
    @ApiModelProperty("注册资本（企业:万元）") private String regcap;
    @ApiModelProperty("成立日期") private String esdate;
    @ApiModelProperty("法定代表人/负责人/执行事务合伙人") private String frname;
    @ApiModelProperty("登记机关") private String regorg;
    @ApiModelProperty("经营状态") private String entstatus;
    @ApiModelProperty("经营状态编码") private String entstatuscode;
    @ApiModelProperty("企业类型") private String enttype;
    @ApiModelProperty("所在省份") private String regorgprovince;
    @ApiModelProperty("所在城市") private String regorgcity;
    @ApiModelProperty("所在城市编码") private String regcity;
    @ApiModelProperty("所在区/县") private String regorgdistrict;
    @ApiModelProperty("注册资本币种代码") private String regcapcurcode;
    @ApiModelProperty("注册资本币种") private String regcapcur;
    @ApiModelProperty("最后年检年度") private String ancheyear;
    @ApiModelProperty("邮编") private String postalcode;
    @ApiModelProperty("住址") private String dom;
    @ApiModelProperty("吊销日期") private String revdate;
    @ApiModelProperty("注销日期") private String candate;
    @ApiModelProperty("注册地址行政编号") private String regorgcode;
    @ApiModelProperty("经营业务范围") private String zsopscope;
    @ApiModelProperty("实体类型") private String entitytype;
    @ApiModelProperty("曾用名") private String entname_old;
    @ApiModelProperty("核准日期") private String apprdate;
    @ApiModelProperty("企业(机构)类型编码") private String enttypecode;
    @ApiModelProperty("所在省份编码") private String s_ext_nodenum;
    @ApiModelProperty("企业 ENTID") private String entid;
    @ApiModelProperty("企业电话") private String tel;

    public static EntBasicVO getEntBasic(EntBasicDTO data) {
        return EntBasicVO.builder()
                .abuitem(data.getABUITEM())
                .orgcodes(data.getORGCODES())
                .regno(data.getREGNO())
                .creditcode(data.getCREDITCODE())
                .opto(data.getOPTO())
                .opfrom(data.getOPFROM())
                .entname(data.getENTNAME())
                .regcap(data.getREGCAP())
                .esdate(data.getESDATE())
                .frname(data.getFRNAME())
                .regorg(data.getREGORG())
                .entstatus(data.getENTSTATUS())
                .entstatuscode(data.getENTSTATUSCODE())
                .enttype(data.getENTTYPE())
                .regorgprovince(data.getREGORGPROVINCE())
                .regorgcity(data.getREGORGCITY())
                .regcity(data.getREGCITY())
                .regorgdistrict(data.getREGORGDISTRICT())
                .regcapcurcode(data.getREGCAPCURCODE())
                .regcapcur(data.getREGCAPCUR())
                .ancheyear(data.getANCHEYEAR())
                .postalcode(data.getPOSTALCODE())
                .dom(data.getDOM())
                .revdate(data.getREVDATE())
                .candate(data.getCANDATE())
                .regorgcode(data.getREGORGCODE())
                .zsopscope(data.getZSOPSCOPE())
                .entitytype(data.getENTITYTYPE())
                .entname_old(data.getENTNAME_OLD())
                .apprdate(data.getAPPRDATE())
                .enttypecode(data.getENTTYPECODE())
                .s_ext_nodenum(data.getS_EXT_NODENUM())
                .entid(data.getENTID())
                .build();
    }

}
